package com.cdks.wuxiu.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 支付宝支付环境配置
 */
@Component
@ConfigurationProperties(prefix = "alipay")
public class AlipayProps {
    /**
     * 应用ID
     */
    public static String appId;
    /**
     * 应用私钥
     */
    public static String privateKey;
    /**
     * 支付宝公钥
     */
    public static String publicKey;
    /**
     * 应用公钥证书
     */
    public static String appCertPath;
    /**
     * 支付宝公钥证书
     */
    public static String aliPayCertPath;
    /**
     * 支付宝根证书
     */
    public static String aliPayRootCertPath;
    /**
     * 支付宝支付网关
     */
    public static String serverUrl;
    /**
     * 支付通知域名
     */
    public static String domain;

    public void setAppId(String appId) {
        AlipayProps.appId = appId;
    }

    public void setPrivateKey(String privateKey) {
        AlipayProps.privateKey = privateKey;
    }

    public void setPublicKey(String publicKey) {
        AlipayProps.publicKey = publicKey;
    }

    public void setAppCertPath(String appCertPath) {
        AlipayProps.appCertPath = appCertPath;
    }

    public void setAliPayCertPath(String aliPayCertPath) {
        AlipayProps.aliPayCertPath = aliPayCertPath;
    }

    public void setAliPayRootCertPath(String aliPayRootCertPath) {
        AlipayProps.aliPayRootCertPath = aliPayRootCertPath;
    }

    public void setServerUrl(String serverUrl) {
        AlipayProps.serverUrl = serverUrl;
    }

    public void setDomain(String domain) {
        AlipayProps.domain = domain;
    }
}

